-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
Able to start VM's from disk and memory snapshots
…hots When no snapshots are available, the VM's disk must be set to reset on boot via the VDI.on-boot=reset param. This ensures that samples do not permanently modify the analysis VM.
Great work! specially since newer versions of esxi (free) don't have API. |
It looks good to me, but it would be good to have some proper testing. For significant contributions, please also remember to check out this http://cuckoofoundation.org/contribute. |
Signing the agreement shouldn't be problem. I'll take a look at it tomorrow. As far as testing, I tested the machinery against a XenServer instance that I already had running with multiple VMs and different configurations. Beyond that, are you looking for anything formal? |
No, not formal, but it's generally good to have feedback from other users so that they can verify the setup and configuration procedures as well as perhaps reveal issues that only different installations might raise. |
ameily: o The documentation doesn't mention installing xenapi. Gave me an error - 'pip install xenapi' fixed it |
The XenAPI XMLRPC connection is not thread safe. I modified the machinery to store a single XenAPI connection in each thread. Creating the connection is done on the fly and on demand; a new connection is created when a thread uses the machinery for the first time.
Thanks for the feedback @wealthychef! I've clarified spots of my documentation that you pointed out. Specifically, I modifed the Also, I'd like to confirm that the hanging issue you are seeing is not the XenServer machinery. I tested the machinery locally again and found that the XenAPI is not thread safe. I've fixed this limitation with my recent commits. My guess is that you were either seeing this issue or you did not specify a runtime timeout for the samples. Can you please retest and verify that the issue is not with the XenServer machinery? |
I checked out the documentation and it looks like the ambiguities were addressed. I also re-ran my previous tests to attempt to get cuckoo to 'hang', but it ran smoothly through everything I threw at it. Thanks for the quick response! |
Unless @jekil has some issues with it, I'm ok for merging. |
@botherder ok for me |
@ameily thanks a lot for this contribution, it is really high-quality code. |
Hi. Now I am using Ubuntu with Xen hypervisor. Could I use the XenServer machinery? Or how could II modify it? The xen hypervisor does not have a XenServer URL. |
The stock Xen hypervisor is not compatible with the XenServer machinery. However, you should be able to use the libvirt machinery. |
Thank you! Just to be sure, I should modify the machinery=xen in the cuckoo.conf, right? |
This merge request implements the XenServer machinery. The machinery communicates to a XenServer instance through the XenAPI library, which uses an HTTP(S) XML RPC interface. The machinery supports the following functions:
start()
andstop()
_status()
list()
The XenServer machinery supports two methods of VM restoration:
Memory and disk snapshots require that the VM has the Xen guest tools installed, which may not be possible in some environments. Therefore, the machinery also supports launching VMs that have their disks reset on boot, which is configured on a per VM basis in the XenServer instance.
The documentation has also been updated to include XenServer related configuration and usage.